package com.boss.controller;

import com.alibaba.fastjson.JSON;
import com.boss.entity.CompanyService;
import com.boss.service.CompanysService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class CompanyController {
    @Autowired
    private CompanysService companysService;
    @RequestMapping("/bb")
    public String list(){
        List<CompanyService> list=companysService.getCompany();
        String json =  JSON.toJSONString(list);
        return json;
    }
}
